package com.imufe.chemicalenterprisedangerwarning.mapper;

import com.imufe.chemicalenterprisedangerwarning.entity.po.UserRolePO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BaiBan
 * @since 2022-10-11
 */
@Repository
public interface UserRoleMapper extends BaseMapper<UserRolePO> {

    @Select("SELECT role_id FROM user_role WHERE user_id = #{userId}")
    Long selectRoleIdByUserId(Long userId);
}